/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.jjsoft.celularessuc.gco.mdl;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Johnny
 */
@Entity
@Table(catalog = "celularessuc", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Configuracion.findAll", query = "SELECT c FROM Configuracion c"),
    @NamedQuery(name = "Configuracion.findByIdConfig", query = "SELECT c FROM Configuracion c WHERE c.idConfig = :idConfig"),
    @NamedQuery(name = "Configuracion.findByIva", query = "SELECT c FROM Configuracion c WHERE c.iva = :iva"),
    @NamedQuery(name = "Configuracion.findByNombreLocal", query = "SELECT c FROM Configuracion c WHERE c.nombreLocal = :nombreLocal"),
    @NamedQuery(name = "Configuracion.findByLogo", query = "SELECT c FROM Configuracion c WHERE c.logo = :logo"),
    @NamedQuery(name = "Configuracion.findByNombreDuenio", query = "SELECT c FROM Configuracion c WHERE c.nombreDuenio = :nombreDuenio"),
    @NamedQuery(name = "Configuracion.findByDireccion", query = "SELECT c FROM Configuracion c WHERE c.direccion = :direccion"),
    @NamedQuery(name = "Configuracion.findByTelefono", query = "SELECT c FROM Configuracion c WHERE c.telefono = :telefono"),
    @NamedQuery(name = "Configuracion.findByImpresoraFactura", query = "SELECT c FROM Configuracion c WHERE c.impresoraFactura = :impresoraFactura"),
    @NamedQuery(name = "Configuracion.findByImpresoraProforma", query = "SELECT c FROM Configuracion c WHERE c.impresoraProforma = :impresoraProforma"),
    @NamedQuery(name = "Configuracion.findByRuc", query = "SELECT c FROM Configuracion c WHERE c.ruc = :ruc"),
    @NamedQuery(name = "Configuracion.findByPathBase", query = "SELECT c FROM Configuracion c WHERE c.pathBase = :pathBase"),
    @NamedQuery(name = "Configuracion.findByClaveBase", query = "SELECT c FROM Configuracion c WHERE c.claveBase = :claveBase"),
    @NamedQuery(name = "Configuracion.findByDirIp", query = "SELECT c FROM Configuracion c WHERE c.dirIp = :dirIp")})
public class Configuracion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer idConfig;
    @Basic(optional = false)
    @Column(nullable = false)
    private double iva;
    @Column(length = 45)
    private String nombreLocal;
    @Column(length = 200)
    private String logo;
    @Column(length = 45)
    private String nombreDuenio;
    @Column(length = 45)
    private String direccion;
    @Column(length = 45)
    private String telefono;
    @Column(length = 200)
    private String impresoraFactura;
    @Column(length = 200)
    private String impresoraProforma;
    @Column(length = 13)
    private String ruc;
    @Column(length = 200)
    private String pathBase;
    @Column(length = 45)
    private String claveBase;
    @Column(length = 20)
    private String dirIp;
    @JoinColumn(name = "idSucursal", referencedColumnName = "idsucursal")
    @ManyToOne
    private Sucursal idSucursal;

    public Configuracion() {
    }

    public Configuracion(Integer idConfig) {
        this.idConfig = idConfig;
    }

    public Configuracion(Integer idConfig, double iva) {
        this.idConfig = idConfig;
        this.iva = iva;
    }

    public Integer getIdConfig() {
        return idConfig;
    }

    public void setIdConfig(Integer idConfig) {
        this.idConfig = idConfig;
    }

    public double getIva() {
        return iva;
    }

    public void setIva(double iva) {
        this.iva = iva;
    }

    public String getNombreLocal() {
        return nombreLocal;
    }

    public void setNombreLocal(String nombreLocal) {
        this.nombreLocal = nombreLocal;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getNombreDuenio() {
        return nombreDuenio;
    }

    public void setNombreDuenio(String nombreDuenio) {
        this.nombreDuenio = nombreDuenio;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public String getTelefono() {
        return telefono;
    }

    public void setTelefono(String telefono) {
        this.telefono = telefono;
    }

    public String getImpresoraFactura() {
        return impresoraFactura;
    }

    public void setImpresoraFactura(String impresoraFactura) {
        this.impresoraFactura = impresoraFactura;
    }

    public String getImpresoraProforma() {
        return impresoraProforma;
    }

    public void setImpresoraProforma(String impresoraProforma) {
        this.impresoraProforma = impresoraProforma;
    }

    public String getRuc() {
        return ruc;
    }

    public void setRuc(String ruc) {
        this.ruc = ruc;
    }

    public String getPathBase() {
        return pathBase;
    }

    public void setPathBase(String pathBase) {
        this.pathBase = pathBase;
    }

    public String getClaveBase() {
        return claveBase;
    }

    public void setClaveBase(String claveBase) {
        this.claveBase = claveBase;
    }

    public String getDirIp() {
        return dirIp;
    }

    public void setDirIp(String dirIp) {
        this.dirIp = dirIp;
    }

    public Sucursal getIdSucursal() {
        return idSucursal;
    }

    public void setIdSucursal(Sucursal idSucursal) {
        this.idSucursal = idSucursal;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idConfig != null ? idConfig.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Configuracion)) {
            return false;
        }
        Configuracion other = (Configuracion) object;
        if ((this.idConfig == null && other.idConfig != null) || (this.idConfig != null && !this.idConfig.equals(other.idConfig))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.jjsoft.celularessuc.gco.mdl.Configuracion[ idConfig=" + idConfig + " ]";
    }
    
}
